using MicroMsg.Network;
using MicroMsg.Scene;
using System;
namespace MicroMsg.Plugin.Sns.Scene
{
	public class DownloadMediaContextMgr : ContextMgrBase<DownloadMediaContext>
	{
		private const string TAG = "DownloadMediaContextMgr";
		private static DownloadMediaContextMgr _mInstance;
		public static DownloadMediaContextMgr Instance
		{
			get
			{
				if (DownloadMediaContextMgr._mInstance == null)
				{
					DownloadMediaContextMgr._mInstance = new DownloadMediaContextMgr();
				}
				return DownloadMediaContextMgr._mInstance;
			}
		}
		public bool isExistInQueue(ulong snsObjID, string string_0)
		{
			bool result;
			lock (this.mQueueLock)
			{
				if (this.mContextQueue.isEmpty())
				{
					result = false;
				}
				else
				{
					for (ListNode next = this.mContextQueue._head._next; next != null; next = next._next)
					{
						DownloadMediaContext downloadMediaContext = (DownloadMediaContext)next._obj;
						if (downloadMediaContext != null && downloadMediaContext.mSnsMediaInfo.snsObjID == snsObjID && downloadMediaContext.mSnsMediaInfo.string_0 == string_0)
						{
							result = true;
							return result;
						}
					}
					result = false;
				}
			}
			return result;
		}
	}
}
